import {
	request
} from "../utils/request.js";

export const login = (data) => {
	return request.post('/auth/login', data);
}

export const getLoginCaptcha = (t) => {
	return request.get(`/auth/loginCaptcha`, {
		params: {
			t,
			noStatus: true
		}
	})
}
export const register = (data) => {
	return request.post('/auth/register', data);
}

export const getRegisterCaptcha = (t) => {
	return request.get(`/auth/registerCaptcha`, {
		params: {
			t,
			noStatus: true
		}
	})
}

export const getUserInfo = () => {
	return request.get('/auth/user');
}

export const updateUserInfo = (data) => {
	return request.put('/auth/user', data)
}
export const setOpenId = (data) => {
	return request.post("/auth/setOpenId", data);
}
export const orderForm = (data) => {
	return request.post("/auth/orderForm", data);
}
export const setPayPassword = (data) => {
	return request.post("/auth/updatePayPassword", data);
}